package fm.dongman.modellib.local;

import java.util.ArrayList;
import java.util.List;

/**
 * 数据表
 * Created by KUIGE on 2017/10/29.
 */

class DataTable {
    static List<String> getTable()
    {
        List<String> mList = new ArrayList<>();
        String ID = "id integer primary key autoincrement,";
        String TEXT = " text,";
        String CREATES = "create table if not exists ";

        String str = CREATES + "article(" +
                ID +
                ConstFlags.Article.ARTICLE + TEXT +
                ConstFlags.Article.BROWSECOUNT + TEXT +
                ConstFlags.Article.COMMENTCOUNT + TEXT +
                ConstFlags.Article.CREATETIME + TEXT +
                ConstFlags.Article.IMGURL + TEXT +
                ConstFlags.Article.SUMMARY + TEXT +
                ConstFlags.Article.TITLE + TEXT +
                ConstFlags.Article.USERSOURCE + " text)";

        mList.add(str);

        str = CREATES + " comment_user(" + ID +
                ConstFlags.User.AVATARURL +TEXT+
                ConstFlags.User.GUANZHU + TEXT+
                ConstFlags.User.USERNAME +TEXT+
                ConstFlags.User.USERID +" text)";
        mList.add(str);

        str = CREATES +ConstFlags.SearchKey.TABLE+" ( " +
                ID+ConstFlags.SearchKey.WORD+" text)";

        mList.add(str);

        str = CREATES + "banner(" +
                ID + ConstFlags.Banner.ARTICLE + TEXT +
                ConstFlags.Banner.IMGURL + TEXT +
                ConstFlags.Banner.SUBJECTID + TEXT +
                ConstFlags.Banner.TITLE + " text)";

        mList.add(str);

        str = CREATES + "comic(" +
                ID + ConstFlags.Comic.TITLE + TEXT +
                ConstFlags.Comic.SUBJECTID + TEXT +
                ConstFlags.Comic.IMGURL + TEXT +
                ConstFlags.Comic.RATESCORE + " text)";

        mList.add(str);

        str = CREATES + "comment(" +
                ID + ConstFlags.Comment.AVATARURL + TEXT +
                ConstFlags.Comment.CONTENT + TEXT +
                ConstFlags.Comment.CREATETIME + TEXT +
                ConstFlags.Comment.TIME + TEXT +
                ConstFlags.Comment.SEX + TEXT +
                ConstFlags.Comment.USERID + TEXT +
                ConstFlags.Comment.USERNAME + TEXT +
                ConstFlags.Comment.SUMMARY + " text)";

        mList.add(str);

        str = CREATES + "sheet(" +
                ID + ConstFlags.Sheet.CREATETIME + TEXT +
                ConstFlags.Sheet.MANDANTITLE + TEXT +
                ConstFlags.Sheet.MANDANID + TEXT +
                ConstFlags.Sheet.AVATARURL + TEXT +
                ConstFlags.Sheet.USERID + TEXT +
                ConstFlags.Sheet.USERNAME + TEXT +
                ConstFlags.Sheet.NUM + TEXT +
                ConstFlags.Sheet.SUMMARY + " text)";

        mList.add(str);

        str = CREATES + "rankComic(" +
                ID + ConstFlags.RankComic.TITLE + TEXT +
                ConstFlags.RankComic.SUBJECTID + TEXT +
                ConstFlags.RankComic.IMGURL + TEXT +
                ConstFlags.RankComic.RATECORE + " text)";

        mList.add(str);

        str = CREATES + "user(" +
                ID + ConstFlags.User.USERNAME + TEXT +
                ConstFlags.User.USERID + TEXT +
                ConstFlags.User.USERFANSNUM + TEXT +
                ConstFlags.User.TOKEN +TEXT+
                ConstFlags.User.UPTOKEN +TEXT+
                ConstFlags.User.MESSAGE +TEXT +
                ConstFlags.User.GUANZHU +TEXT+
                ConstFlags.User.AVATARURL + TEXT +
                ConstFlags.User.USERSUMMARY + " text)";

        mList.add(str);

        str = CREATES + " fmandan_daren(" +
                ID + ConstFlags.fMandan_daren.MAVATARURL + TEXT +
                ConstFlags.fMandan_daren.MMANDANCOUNT + TEXT +
                ConstFlags.fMandan_daren.MUSERID + TEXT +
                ConstFlags.fMandan_daren.MUSERNAME + " text)";
        mList.add(str);

        str = CREATES + " fmandan_list(" +
                ID + ConstFlags.fMandan_list.AVATARURL + TEXT +
                ConstFlags.fMandan_list.BANGUMICOUNT + TEXT +
                ConstFlags.fMandan_list.MANDANID + TEXT +
                ConstFlags.fMandan_list.MANDANIMG + TEXT +
                ConstFlags.fMandan_list.MANDANTITLE + TEXT +
                ConstFlags.fMandan_list.USERID + TEXT +
                ConstFlags.fMandan_list.USERNAME + " text)";

        mList.add(str);

        str = CREATES + " fmandan_tag(" +
                ID + ConstFlags.fMandan_Tag.TAGID + TEXT +
                ConstFlags.fMandan_Tag.TAGNAME + TEXT +
                ConstFlags.fMandan_Tag.TAGIMG + " text)";

        mList.add(str);


        str = CREATES + " fmandan_spec(" +
                ID + ConstFlags.fMandan_Spec.BANGUMICOUNT + TEXT +
                ConstFlags.fMandan_Spec.BROWSECOUNT + TEXT +
                ConstFlags.fMandan_Spec.COLLECTCOUNT + TEXT +
                ConstFlags.fMandan_Spec.CREATE_TIME + TEXT +
                ConstFlags.fMandan_Spec.SUMMARY + TEXT +
                ConstFlags.fMandan_Spec.TOPICID + TEXT +
                ConstFlags.fMandan_Spec.TOPICIMG + TEXT +
                ConstFlags.fMandan_Spec.TOPICTITLE + " text)";
        mList.add(str);

        str = CREATES + ConstFlags.FArticleHot.TABLE +"(" +
                ID + ConstFlags.FArticleHot.ID + TEXT +
                ConstFlags.FArticleHot.TITLE + TEXT +
                ConstFlags.FArticleHot.CONTEXT + TEXT +
                ConstFlags.FArticleHot.BROWSE_COUNT+TEXT+
                ConstFlags.FArticleHot.CREATE_TIME+TEXT+
                ConstFlags.FArticleHot.IMG_URL + " text)";
        mList.add(str);


        str = CREATES + ConstFlags.FArticleBanner.TABLE +"(" +
                ID + ConstFlags.FArticleBanner.ID + TEXT +
                ConstFlags.FArticleBanner.TITLE + TEXT +
                ConstFlags.FArticleBanner.IMG_URL + " text)";
        mList.add(str);

        str = CREATES + ConstFlags.FArticleNew.TABLE +"(" +
                ID + ConstFlags.FArticleNew.USER_ID + TEXT +
                ConstFlags.FArticleNew.TITLE + TEXT +
                ConstFlags.FArticleNew.CONTENT + TEXT +
                ConstFlags.FArticleNew.IMG_URL + " text)";
        mList.add(str);

        //最新速递
        str = CREATES + ConstFlags.ComicComics.TABLE + "(" + ID +
                ConstFlags.ComicComics.CREATE_TIME + TEXT +
                ConstFlags.ComicComics.EPISODES + TEXT +
                ConstFlags.ComicComics.SUBJECT_ID + TEXT +
                ConstFlags.ComicComics.IMG_URL +TEXT+
                ConstFlags.ComicComics.GENRE+TEXT+
                ConstFlags.ComicComics.DIRECTOR+TEXT+
                ConstFlags.ComicComics.TITLE + " text)";
        mList.add(str);

        //吐槽
        str = CREATES + ConstFlags.ComicNewComment.TABLE + "(" + ID +
                ConstFlags.ComicNewComment.AVATAR_URL + TEXT +
                ConstFlags.ComicNewComment.CONTENT + TEXT +
                ConstFlags.ComicNewComment.CREATE_TIME + TEXT +
                ConstFlags.ComicNewComment.SUBJECT_ID + TEXT +
                ConstFlags.ComicNewComment.TITLE + TEXT +
                ConstFlags.ComicNewComment.USER_ID + TEXT +
                ConstFlags.ComicNewComment.USERNAME + " text)";
        mList.add(str);

        //推荐新番
        str = CREATES + ConstFlags.ComicRecommendComics.TABLE + "(" + ID +
                ConstFlags.ComicRecommendComics.IMG_URL + TEXT +
                ConstFlags.ComicRecommendComics.RATE + TEXT +
                ConstFlags.ComicRecommendComics.SUBJECT_ID + TEXT +
                ConstFlags.ComicRecommendComics.SUBJECT_NAME + TEXT +
                ConstFlags.ComicRecommendComics.UPTIME + " text)";
        mList.add(str);

        //搜索关键字
        str = CREATES + ConstFlags.SearchHotWords.TABLE + "(" + ID+
                ConstFlags.SearchHotWords.HOT_SEARCH +TEXT+
                ConstFlags.SearchHotWords.HOT_PAST + " text)";
        mList.add(str);

        str = CREATES + ConstFlags.fManbang_xinfan.TABLE + "(" +ID+
                ConstFlags.fManbang_xinfan.TITLE+TEXT+
                ConstFlags.fManbang_xinfan.SUBJECT_ID+" text)";
        mList.add(str);

        str = CREATES + ConstFlags.fManbang_Hot.TABLE + "(" +ID+
                ConstFlags.fManbang_Hot.TITLE+TEXT+
                ConstFlags.fManbang_Hot.SUBJECT_ID+" text)";
        mList.add(str);

        str = CREATES + ConstFlags.fManbang_guochan.TABLE + "(" +ID+
                ConstFlags.fManbang_guochan.TITLE+TEXT+
                ConstFlags.fManbang_guochan.SUBJECT_ID+" text)";
        mList.add(str);

        str = CREATES + ConstFlags.fManbang_hougong.TABLE + "(" +ID+
                ConstFlags.fManbang_hougong.TITLE+TEXT+
                ConstFlags.fManbang_hougong.SUBJECT_ID+" text)";
        mList.add(str);

        return mList;
    }
}
